package com.sunny.structure.queue;

/**
 * @author Sunny
 * @date 2020/5/28
 */
public class MyQueue {

    private int[] arrays;
    private int front;
    private int rear;

    /**
     * 判断队列是否满
     */
    public static boolean isFull(MyQueue myQueue) {
        return myQueue.front == ((myQueue.rear + 1) % myQueue.arrays.length);
    }

    /**
     * 判断队列是否空
     */
    public static boolean isEmpty(MyQueue myQueue) {
        return myQueue.front == myQueue.rear;
    }
}
